package com.zjdiepu.www.commpent.mapper.dh;

import javax.annotation.Resource;

import org.springframework.data.redis.connection.RedisConnection;
import org.springframework.stereotype.Component;

import com.zjdiepu.www.base.core.BaseMapper;
import com.zjdiepu.www.commpent.RedisObjectClient;
import com.zjdiepu.www.ibiz.third.IJuheCityService;
import com.zjdiepu.www.ibiz.third.IJuheProvinceService;
import com.zjdiepu.www.model.dz.dto.DzRegistration;

/**
 * 项目名称：dpqc-parent-manager-information <br/> 
 * 类名称：YwBusinessCarVoMapper <br/>  
 * 类描述： 车牌登记 <br/>    
 * 创建人：xiongxiaotun <br/> 
 * 创建时间：2017年4月26日 下午5:29:32  <br/>   
 * 修改人：xiongxiaotun <br/> 
 * 修改时间：2017年4月26日 下午5:29:32   <br/>  
 * 修改备注：    <br/> 
 * @version V1.0   <br/>
 */
@Component
public class DzRegistrationVoMapper extends BaseMapper<DzRegistration>{
	@Resource
	private IJuheProvinceService juheProvinceService;
	@Resource
	private IJuheCityService juheCityService;
	@Resource
	private RedisObjectClient redisObjectClient;

	@Override
	public void mapper(RedisConnection redisConnection,DzRegistration m) {
		if(null == m) {
			return;
		}
		/*String provinceRegistration = m.getProvinceRegistration();
		if(StringUtil.isNotBlank(provinceRegistration)) {
			JuheProvinceExt juheProvinceExt = new JuheProvinceExt();
			juheProvinceExt.setProId(provinceRegistration);
			juheProvinceExt.setRows(1);
			List<JuheProvince> juheProvinces = juheProvinceService.selectByExt(juheProvinceExt);
			if(CollectionUtils.isNotEmpty(juheProvinces)) {
				m.setProvinceRegistrationDisplay(juheProvinces.get(0).getProName());
			}
		}
		String areaRegistration = m.getAreaRegistration();
		if(StringUtil.isNotBlank(areaRegistration)) {
			JuheCityExt juheCityExt = new JuheCityExt();
			juheCityExt.setCityId(areaRegistration);
			juheCityExt.setRows(1);
			List<JuheCity> juheCitys = juheCityService.selectByExt(juheCityExt);
			if(CollectionUtils.isNotEmpty(juheCitys)) {
				m.setAreaRegistrationDisplay(juheCitys.get(0).getCityName());
			}
		}*/
	}

}
